Skip to content

logs: never pass a raw error object to console.* - #408

Merged
ReganBell merged 3 commits into
mainfrom
upstream-1762
Aug 13, 2026
Merged

logs: never pass a raw error object to console.*#408
ReganBell merged 3 commits into
mainfrom
upstream-1762

Conversation

@ReganBell

@ReganBell ReganBell commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

An error object can carry HTTP response bodies, connection strings, or credential material in its properties — in a codebase that handles decrypted credentials, dumping it wholesale into logs is a leak vector. Wrap every raw error passed to console.* in errMessage(...) across src/ (String(e) in plugins that cannot import core utilities) and enforce the pattern with a no-restricted-syntax lint rule so new call sites cannot regress. Local scripts and test CLI crash handlers keep full stacks for debugging.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

16francej and others added 2 commits August 13, 2026 10:19
* feat: surface named environments in admin

Co-Authored-By: QM <qm@users.noreply.github.com>

* refactor: clarify environment metadata response

---------

Co-authored-by: Sprite <noreply@sprites.dev>
Co-authored-by: QM <qm@users.noreply.github.com>
An error object can carry HTTP response bodies, connection strings, or credential material in its properties — in a codebase that handles decrypted credentials, dumping it wholesale into logs is a leak vector. Wrap every raw error passed to console.* in errMessage(...) across src/ (String(e) in plugins that cannot import core utilities) and enforce the pattern with a no-restricted-syntax lint rule so new call sites cannot regress. Local scripts and test CLI crash handlers keep full stacks for debugging.
Comment thread plugins/auth/src/index.ts Fixed
Comment thread plugins/portal/src/index.ts Fixed
Comment thread plugins/web-ui/server/index.ts Fixed
Comment thread src/api/server.ts Fixed
@ReganBell
ReganBell merged commit cb29020 into main Aug 13, 2026
21 checks passed
@ReganBell
ReganBell deleted the upstream-1762 branch August 13, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants